package com.fram.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fram.bean.admin.distributor.response.DistributorSearchResponse;
import com.fram.bean.api.distributor.request.DistributorFarmRequest;
import com.fram.bean.api.distributor.response.DistributorApplyResponse;
import com.fram.bean.api.distributor.response.DistributorFarmResponse;
import com.fram.entity.DistributorFarm;

public interface DistributorFarmMapper {

	// 详情
	DistributorFarm selectByPrimaryKey(Long id);

	// 根据分销商主键id删除
	int deleteByPrimaryKey(Long id);

	// 增加分销商权限
	int insertSelective(DistributorFarm record);

	// 分销商根据修改
	int updateByPrimaryKeySelective(DistributorFarm record);

	int updateByPrimaryKey(DistributorFarm record);

	int insert(DistributorFarm record);

	// 根据id 指定 店铺查看
	DistributorFarmResponse selectById(@Param("distributorId") Long distributorId);

	// -后台分销商列表
	List<DistributorSearchResponse> selectAll(DistributorFarm request);

	List<DistributorFarmResponse> select(DistributorFarmRequest distributorFarmRequest);

	DistributorFarmResponse selectByAdminUserId(Long adminUserId);

	// 申请成为合伙人资料
	DistributorApplyResponse distributorApplyDetail(Long userId);
	
	
	//返回 Long
	Long selectByUserId(Long userId);
	
	//下拉店铺
	List<DistributorFarm> withChildren(DistributorFarm request);
}